<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../common/head.jsp"%>
<div class="bjui-pageContent">
	<form action="${ctx}/sys/updateItemCheckStudent.do" id="j_custom_form" data-toggle="validate" data-alertmsg="false">
		<input type="hidden" value="${teacher.id}" name="teacherId" />
		<table class="table table-condensed table-hover" width="100%">
			<tbody>
				<tr>
					<td colspan="2">
						<label class="control-label x150">教师：</label>
						<div style="display: inline-block; vertical-align: middle;">
							<img alt="" src="${ctx}/resource/${teacher.photo}" style="border-radius: 0.1em;" width="120px"
								onerror="javascript:this.src='${ctx}/resource/no-head.png'">
							<br />
						</div>
					</td>
				</tr>
				<tr>
					<td>
						<label for="CourseClazz_clazz" class="control-label x150">系部：</label>
						${teacher.spec.name }
					</td>

					<td>
						<label for="${actionclass}_uname" class="control-label x150">账号：</label>
						${teacher.uname}
					</td>
				</tr>
				<tr>
					<td>
						<label for="${actionclass}_userName" class="control-label x150">姓名：</label>
						${teacher.userName}
					</td>

					<td>
						<label for="${actionclass}_userGender" class="control-label x150">性别：</label>
						${teacher.userGender}
					</td>
				</tr>
				<tr>
					<td>
						<label for="${actionclass}_userName" class="control-label x150">类别：</label>
						${result.typesel}
					</td>

					<td>
						<label for="${actionclass}_userGender" class="control-label x150">评价人：</label>
						${result.fuser}
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<label for="${actionclass}_userName" class="control-label x150">评分：</label>
						${result.score}
					</td>
				</tr>

			</tbody>
		</table>
		<table class="table table-bordered table-hover table-striped table-top" data-selected-multi="false">
			<thead>
				<tr>
					<th>指标</th>
					<th>分值</th>
					<th width="100">评分</th>
					<th>说明</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${itemList}" var="item">
					<tr data-id="${item.id }">
						<td>${item.name}</td>
						<td>${item.fen}</td>
						<td>
							<input type="text" name="score_${item.id }" value="" id="score_${item.id }" data-rule="required;digits;range[0~${item.fen}]"
								size="15" placeholder="0 - ${item.fen}">
						</td>
						<td>${item.note}</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</form>
</div>
<div class="bjui-pageFooter">
	<ul>
		<c:if test="${empty result }">
		<li>
			<button type="button" class="btn-close" data-icon="close">取消</button>
		</li>
		<li>
			<button type="submit" class="btn-default" data-icon="save">提交评价</button>
		</li>
		</c:if>
	</ul>
</div>
<c:if test="${not empty result }">
<script type="text/javascript">
	var result = ${result.cresult};
	for(var i = 0;i<result.length;i++){
		$("#score_"+result[i].id).val(result[i].score);
	}
</script>
</c:if>
